Sysext by be2003 for Luaplayer

To use this put the sysext.lrx file in your luaplayer folder and call this from your script:

sysext = loadlib("sysext","init")
if sysext then sysext() end

thanks to John_K's for source from PSPMediaCenter,

-----------------------------------
version 0.1
-----------------------------------
Added Sysext.Quit() which will exit Lua Player back to the PSP browser 
Added Sysext.isUmdInserted() and will return true if a UMD is inserted 
Added Sysext.initUMD() which will mount the UMD to disk0: (it will not launch it) 
Added Sysext.setCpuSpeedHigh()
Added Sysext.setCpuSpeedMed()
Added Sysext.setCpuSpeedReg()
which changes the CPU speed to 333 MHz, 266 MHz, and 222 MHz respectively. 

-----------------------------------
version 0.2
-----------------------------------
Added Sysext.getCpuSpeed() which returns the current Cpu speed (333,266,222)
Added Sysext.loadModule(path) set the path of a prx module to load it (alpha, may not work)

-----------------------------------
version 0.3
-----------------------------------
Added Mp3 support :) kinda, all from psp media center --- thanks, all functions but one, MP3.GetTimeString(), i didn't know what it was for...
Includes MP3.Init() initializes the mp3 player
Includes MP3.Play() plays the loaded mp3
Includes MP3.Pause() pauses the playing mp3
Includes MP3.Stop() stops the loaded mp3
Includes MP3.End() ends the loaded mp3 (stops it and unloads it from ram)
Includes MP3.FreeTune() clears the ram of the loaded mp3
Includes MP3.Load(file) loads an mp3 as file
Includes MP3.EndOfStream() return true if the mp3 has ended and false if it didn't, duh

-----------------------------------
version 0.4
-----------------------------------
Changed the mp3 api... hre it is:
Includes MP3.Play(file) initializes psp audio loads the file and plays it
Includes MP3.Pause() pauses the playing mp3
Includes MP3.Stop() stops the mp3 unloads it from memory and terminates psp audio
Includes MP3.EndOfStream() return true if the mp3 has ended and false if it didn't, duh

and ...

Added Sysext.loadExec(path) to load an elf executable at path. must be the whole path, eg. "ms0:/psp/game/lua/testprxandelf/testelf.elf"
*Fixed Sysext.getCpuSpeed() which was broken for some reason...

-----------------------------------
version 0.4b
-----------------------------------
Changed all Sysext.whatever() to System.whatever() and MP3.whatever() to Mp3.whatever()
so call System.Quit() etc.
Attempted to fix the mp3 call again to make it work,  remember folks this is my first ever compiled by me thing... lol have fuun

-----------------------------------
version 0.4c
-----------------------------------
Took out System.loadModule(path) because it sucked at life, eg. Luaplayer didn't want anything to do with it so i decided loadExec was enough.

edit: fixed mp3player, it was that i forgot to put define mp3player.o in the makefile lol... 

now the api looks like this: 

Mp3.init() initializes mp3 player 
Mp3.play() plays the loaded mp3 
Mp3.pause() pauses loaded mp3 
Mp3.stop() stops loaded mp3 
Mp3.end() ends loaded mp3 
Mp3.load(file) loads file as mp3 
Mp3.freeTune() removes loaded mp3 from ram 
Mp3.endOfStream() return true if the mp3 is over, false if it isnt 

make sure to call Mp3.init() before loading and playing mp3's and call Mp3.End() when you are finished.

-----------------------------------
version 0.5
-----------------------------------
ZIP ZIP ZIP !!!ALPHA!!!
NOT SURE IF MULTIPLE FILE ZIPS WORK...

Added Zip.compress(file, zipout) compress file into zipout, they are both files so they expect a relevant path
Added Zip.extract(zipin, filesout) uncompress zipin into filesout, they are both files so they expect a relevant path

-----------------------------------
version 0.6
-----------------------------------
MP3 ABOLISHED! lol, just switched to ogg, yup, i'm serious.

umm... here we go:

Added:

Ogg.init() initializes ogg player 
Ogg.play() plays the loaded ogg 
Ogg.pause() pauses loaded ogg
Ogg.stop() stops loaded ogg
Ogg.end() ends loaded ogg
Ogg.load(file) loads file as ogg (relative to current path)
Ogg.freeTune() removes loaded ogg from ram 
Ogg.getTimeString() call like this 'oggtime = Ogg.getTimeString()' it returns time of ogg in HH:MM:SS form as a string or do:

screen.print(5,5,Ogg.getTimeString(),green) --sample

Ogg.endOfStream() return true if the ogg is over, false if it isnt 